package com.atguigu.gulimall.fegin;

import com.atguigu.common.utils.R;
import com.atguigu.common.vo.MemberInfoVo;
import com.atguigu.common.vo.MemberVo;
import com.atguigu.gulimall.vo.UserRegisterVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = "gulimall-member")
public interface MemberRegister {

    @PostMapping("member/member/register")
    R register(@RequestBody UserRegisterVo userRegisterVo);

    @GetMapping("member/member/login")
    R login(@RequestParam String phone, @RequestParam String password);

    @GetMapping("member/member/oathu/login")
    MemberVo oathuLogin(@RequestParam  String accessToken) throws Exception;

    @PostMapping("member/member/oathu/weibo")
    R  oathuWeiBo(@RequestBody MemberInfoVo vo);
}
